using System;
using ProjectBase.Utils;

namespace Clanta.Core.Domain
{
    public class Track : VersionDomainObject<long, long>
    {
        #region Constructors

        protected Track()
        {
        }

        public Track(string name, Conference conference)
        {
            Name = name;
            Conference = conference;
        }

        #endregion

        #region Properties

        public virtual string Name
        {
            get { return name; }
            set
            {
                Check.Require(!string.IsNullOrEmpty(value), "The name must be provided");
                name = value;
            }
        }

        public virtual Conference Conference
        {
            get { return conference; }
            protected set
            {
                Check.Require(value != null, "The conference that this track belongs to must be provided");
                conference = value;
            }
        }

        #endregion

        #region Fields

        private string name;

        private Conference conference;

        #endregion
    }
}
